@extends('layouts.master',['loading_word'=>'加载中'])
@section('title')
    {{$area->name}}
@endsection
@section('content')
    {{--logo search 开始--}}
    @include('widget.search')
    {{--logo search 结束--}}
    <div id="i-detail-introduc">
        <div class="t-con-top clearfix">
            <div class="t-img">
                <img src="{{$area->cover}}" alt="">
            </div>
            <div class="t-text">
                <h1>{{$area->name}}</h1>
                <p>{{$area->intro}}</p>
                <input type="hidden" class="t-area-id" value="{{$area->id}}">
            </div>
        </div>
        <div class="t-con-bottom">
            <div class="t-tab-btn">
                <ul class="clearfix">
                    <li>周边</li>
                </ul>
            </div>
            <div class="t-list">
                <ul>
                    <li class="t-list1">
                        <ul class="clearfix t-content-1">

                        </ul>
                    </li>
                    <li class="t-list1">
                        <ul class="clearfix t-content-2">

                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <script>
        $.post("/index.php/scene/list",{areaId:$(".t-area-id").val()},function (data) {
            if(data.res){
                for(var i=0;i<data.scenes.length;i++){
                    if(i<4){
                       var li = $("<li><div class='t-pic'><img src='"+data.scenes[i].img+"' />" +
                           "<div class='t-tip'><a href='"+data.scenes[i].url+"'>点击看看</a></div></div><p><a href='"+data.scenes[i].url+"'>"+data.scenes[i].name+"</a></p></li>");
                       $(".t-content-1").append(li);
                    }else{
                        var li = $("<li><div class='t-pic'><img src='"+data.scenes[i].img+"' />" +
                            "<div class='t-tip'><a href='"+data.scenes[i].url+"'>点击看看</a></div></div><p><a href='"+data.scenes[i].url+"'>"+data.scenes[i].name+"</a></p></li>");
                        $(".t-content-2").append(li);
                    }
                }
            }
        });
    </script>
@endsection
